home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIPrintSettingsService.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  136 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2001
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. /* Interface to the Service for gwetting the Global PrintSettings object
  39.    or a unique PrintSettings object
  40. */
  41.  
  42. #include "nsISupports.idl"
  43.  
  44. interface nsIPrintSettings;
  45.  
  46. [scriptable, uuid(841387C8-72E6-484b-9296-BF6EEA80D58A)]
  47. interface nsIPrintSettingsService : nsISupports
  48. {
  49.   /**
  50.    * Returns a "global" PrintSettings object 
  51.    * Creates a new the first time, if one doesn't exist.
  52.    *
  53.    * Then returns the same object each time after that.
  54.    *
  55.    * Initializes the globalPrintSettings from the default printer
  56.    */
  57.   readonly attribute nsIPrintSettings globalPrintSettings;
  58.  
  59.   /**
  60.    * Returns a new, unique PrintSettings object each time.
  61.    *
  62.    * For example, if each browser was to have its own unique
  63.    * PrintSettings, then each browser window would call this to
  64.    * create its own unique PrintSettings object.
  65.    *
  66.    * If each browse window was to use the same PrintSettings object
  67.    * then it should use "globalPrintSettings"
  68.    *
  69.    * Initializes the newPrintSettings from the default printer
  70.    *
  71.    */
  72.   readonly attribute nsIPrintSettings newPrintSettings;
  73.  
  74.   /**
  75.    * The name of the default printer 
  76.    */
  77.   readonly attribute wstring defaultPrinterName;
  78.  
  79.   /**
  80.    * Initializes certain settings from the native printer into the PrintSettings
  81.    * if aPrinterName is null then it uses the default printer name if it can
  82.    * These settings include, but are not limited to:
  83.    *   Page Orientation
  84.    *   Page Size
  85.    *   Number of Copies
  86.    */
  87.   void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
  88.  
  89.   /**
  90.    * Reads PrintSettings values from Prefs,
  91.    * the values to be read are indicated by the "flags" arg.
  92.    *
  93.    * First it reads in the "generic" set of PrintSetings not associated with any printer
  94.    * then it uses the PrinterName in the PrinterSettings to read any settings that were saved
  95.    * just for that printer.
  96.    *
  97.    * aPS - PrintSettings to have its settings read
  98.    * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
  99.    * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the const values.
  100.    *
  101.    * Items not read:
  102.    *   startPageRange, endPageRange, scaling, printRange, title
  103.    *   docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
  104.    *   printFrameType, printSilent, shrinkToFit, numCopies
  105.    *
  106.    */
  107.   void initPrintSettingsFromPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
  108.  
  109.   /**
  110.    * Writes PrintSettings values to Prefs, 
  111.    * the values to be written are indicated by the "flags" arg.
  112.    *
  113.    * If there is no PrinterName in the PrinterSettings 
  114.    * the values are saved as the "generic" values not associated with any printer.
  115.    * If a PrinterName is there, then it saves the items qualified for that Printer
  116.    *
  117.    * aPS - PrintSettings to have its settings saved
  118.    * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
  119.    * aFlags - indicates which prefs to save, see nsIPrintSettings.idl for the const values.
  120.    *
  121.    * Items not written:
  122.    *   startPageRange, endPageRange, scaling, printRange, title
  123.    *   docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
  124.    *   printFrameType, printSilent, shrinkToFit, numCopies
  125.    *
  126.    */
  127.   void savePrintSettingsToPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
  128.  
  129. };
  130.  
  131. %{C++
  132. // {841387C8-72E6-484b-9296-BF6EEA80D58A}
  133. #define NS_PRINTSETTINGSSERVICE_IID \
  134.  {0x841387c8, 0x72e6, 0x484b, { 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a}}
  135. %}
  136.